class CreateUserConfirms < ActiveRecord::Migration
  def change
    create_table :user_confirms do |t|
      t.integer :user_id, :null => false
      t.string :title, :null => false
      t.string :nickname
      t.string :email
      t.string :fullname
      t.string :postcode
      t.string :country
      t.string :language
      t.string :timezone
      t.string :gender, :limit => 1
      t.string :address
      t.string :address_additional
      t.string :city
      t.string :state
      t.string :company_name
      t.string :job_title
      t.string :address_business
      t.string :address_additional_business
      t.string :postcode_business
      t.string :city_business
      t.string :state_business
      t.string :country_business
      t.string :phone_home
      t.string :phone_mobile
      t.string :phone_work
      t.string :phone_fax
      t.string :im_qq
      t.string :im_wx
      t.string :im_sina
      t.string :im_taobao
      t.string :im_msn
      t.string :im_yahoo
      t.string :im_baidu
      t.string :im_skype
      t.string :image_default
      t.string :web_default
      t.string :web_blog
      t.integer :dob_day,   :limit => 2
      t.integer :dob_month,   :limit => 2
      t.integer :dob_year
      t.boolean :deletable, :default => true, :null => false

      t.timestamps
    end
    add_index :user_confirms, [:user_id, :title], :unique => true
  end
end
